<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
<form method="get" action="./login.do">

  用户名：<input type="text" name="username" value=""><br>
  密码：<input type="password" name="password" value=""><br>
  <button type="submit">登录</button>
</form>
<script type="text/javascript" src="https://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>

<script type="text/javascript">
  $(function () {
      var cookie1=$.cookie("username");
      var cookie2=$.cookie("password");
      $('input[name="username"]').val(cookie1);
      $('input[name="password"]').val(cookie2);
  })
</script>
</body>
</html>